<html>
<head>
  <meta HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=ISO-8859-1">
  <title>Contents.m</title>
<link rel="stylesheet" type="text/css" href="../stpr.css">
</head>
<body>
<table  border=0 width="100%" cellpadding=0 cellspacing=0><tr valign="baseline">
<td valign="baseline" class="function"><b class="function">PGMM</b>
<td valign="baseline" align="right" class="function"><a href="../visual/index.html" target="mdsdir"><img border = 0 src="../up.gif"></a></table>
  <p><b>Vizualizes Gaussian mixture model.</b></p>
  <hr>
<div class='code'><code>
<span class=help></span><br>
<span class=help>&nbsp;<span class=help_field>Synopsis:</span></span><br>
<span class=help>&nbsp;&nbsp;pgmm(&nbsp;model&nbsp;);</span><br>
<span class=help>&nbsp;&nbsp;pgmm(&nbsp;model,&nbsp;options&nbsp;);</span><br>
<span class=help>&nbsp;&nbsp;h&nbsp;=&nbsp;pgmm(&nbsp;...&nbsp;);</span><br>
<span class=help></span><br>
<span class=help>&nbsp;<span class=help_field>Description:</span></span><br>
<span class=help>&nbsp;&nbsp;It&nbsp;vizualizes&nbsp;univariate&nbsp;(dim=1)&nbsp;or&nbsp;bivariate&nbsp;(dim=2)&nbsp;Gaussin&nbsp;mixture&nbsp;</span><br>
<span class=help>&nbsp;&nbsp;model&nbsp;(GMM).&nbsp;In&nbsp;the&nbsp;univariate&nbsp;case&nbsp;it&nbsp;also&nbsp;displays&nbsp;mixture&nbsp;components.&nbsp;</span><br>
<span class=help>&nbsp;&nbsp;It&nbsp;returns&nbsp;handles&nbsp;of&nbsp;used&nbsp;graphics&nbsp;objects.</span><br>
<span class=help></span><br>
<span class=help>&nbsp;&nbsp;In&nbsp;the&nbsp;case&nbsp;of&nbsp;bivariate&nbsp;GMM&nbsp;trhere&nbsp;are&nbsp;two&nbsp;options&nbsp;of&nbsp;visualization:</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;&nbsp;countours&nbsp;of&nbsp;p.d.f.&nbsp;&nbsp;...&nbsp;options.visual&nbsp;=&nbsp;'contour'&nbsp;(default)</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;&nbsp;surface&nbsp;of&nbsp;p.d.f.&nbsp;&nbsp;&nbsp;&nbsp;...&nbsp;options.visual&nbsp;=&nbsp;'surf'</span><br>
<span class=help>&nbsp;</span><br>
<span class=help>&nbsp;<span class=help_field>Input:</span></span><br>
<span class=help>&nbsp;&nbsp;model.Mean&nbsp;[dim&nbsp;x&nbsp;ncomp]&nbsp;Mean&nbsp;values.</span><br>
<span class=help>&nbsp;&nbsp;model.Cov&nbsp;[dim&nbsp;x&nbsp;ncomp]&nbsp;Covariances.</span><br>
<span class=help>&nbsp;&nbsp;model.Prior&nbsp;[dim&nbsp;x&nbsp;ncomp]&nbsp;Mixture&nbsp;weights.</span><br>
<span class=help></span><br>
<span class=help>&nbsp;&nbsp;options.comp&nbsp;[1x1]&nbsp;If&nbsp;1&nbsp;(default)&nbsp;then&nbsp;it&nbsp;plots&nbsp;also&nbsp;mixture&nbsp;components.</span><br>
<span class=help>&nbsp;&nbsp;options.visual&nbsp;[string]&nbsp;If&nbsp;equal&nbsp;to&nbsp;'contour'&nbsp;then&nbsp;contour&nbsp;function&nbsp;is&nbsp;</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;&nbsp;used&nbsp;if&nbsp;'surf'&nbsp;then&nbsp;surf&nbsp;functions&nbsp;is&nbsp;used&nbsp;(see&nbsp;above).</span><br>
<span class=help>&nbsp;&nbsp;options.adj_axes&nbsp;[1x1]&nbsp;If&nbsp;1&nbsp;(default)&nbsp;then&nbsp;axes&nbsp;are&nbsp;set&nbsp;to&nbsp;display&nbsp;</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;whole&nbsp;mixture&nbsp;otherwise&nbsp;unchanged.</span><br>
<span class=help>&nbsp;&nbsp;options.color&nbsp;[string]&nbsp;Color&nbsp;of&nbsp;GMM&nbsp;plot&nbsp;in&nbsp;univariate&nbsp;case&nbsp;(default&nbsp;'b').</span><br>
<span class=help></span><br>
<span class=help>&nbsp;<span class=help_field>Output:</span></span><br>
<span class=help>&nbsp;&nbsp;h&nbsp;[1&nbsp;x&nbsp;nobjects]&nbsp;Handles&nbsp;of&nbsp;used&nbsp;graphics&nbsp;object.</span><br>
<span class=help></span><br>
<span class=help>&nbsp;<span class=help_field>Example:</span></span><br>
<span class=help></span><br>
<span class=help>&nbsp;Univariate&nbsp;case:</span><br>
<span class=help>&nbsp;&nbsp;model1&nbsp;=&nbsp;c2s({'Mean',[-3&nbsp;0&nbsp;3],'Cov',[0.5&nbsp;1&nbsp;0.8],'Prior',[0.4&nbsp;0.3&nbsp;0.3]});</span><br>
<span class=help>&nbsp;&nbsp;figure;&nbsp;pgmm(model1);</span><br>
<span class=help></span><br>
<span class=help>&nbsp;Bivariate&nbsp;case:</span><br>
<span class=help>&nbsp;&nbsp;model2.Mean(:,1)&nbsp;=&nbsp;[-1;-1];&nbsp;model2.Cov(:,:,1)&nbsp;=&nbsp;[1,0.5;0.5,1];</span><br>
<span class=help>&nbsp;&nbsp;model2.Mean(:,2)&nbsp;=&nbsp;[1;1];&nbsp;model2.Cov(:,:,2)&nbsp;=&nbsp;[1,-0.5;-0.5,1];</span><br>
<span class=help>&nbsp;&nbsp;model2.Prior&nbsp;=&nbsp;[0.4&nbsp;0.6];</span><br>
<span class=help>&nbsp;&nbsp;figure;&nbsp;pgmm(model2);</span><br>
<span class=help>&nbsp;&nbsp;figure;&nbsp;pgmm(model2,{'visual','surf'});</span><br>
<span class=help></span><br>
</code></div>
  <hr>
  <b>Source:</b> <a href= "../visual/list/pgmm.html">pgmm.m</a>
  <p><b class="info_field">About: </b>  Statistical Pattern Recognition Toolbox<br>
 (C) 1999-2003, Written by Vojtech Franc and Vaclav Hlavac<br>
 <a href="http://www.cvut.cz">Czech Technical University Prague</a><br>
 <a href="http://www.feld.cvut.cz">Faculty of Electrical Engineering</a><br>
 <a href="http://cmp.felk.cvut.cz">Center for Machine Perception</a><br>

  <p><b class="info_field">Modifications: </b> <br>
 2-may-2004, VF<br>
 29-apr2004, VF<br>
 8-mar-2004, VF<br>

</body>
</html>
